﻿package 
{
	import flash.display.Sprite;
	import flash.display.StageDisplayState;
	import flash.display.StageQuality;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import samples.BaseSample;
	import shapes.shapes2D.distribution.trigo.*;
	
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class Distribution extends Sprite 
	{
		
		public function Distribution():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			_stage = stage;
			_stage.scaleMode = StageScaleMode.NO_SCALE;
			
			_stage.quality = StageQuality.LOW;
			_stage.displayState = StageDisplayState.FULL_SCREEN;
			
			var sample:BaseSample;
			var amplitude:Number = 150;
			var frequence:Number = 60;
			
			sample = new Cosine( amplitude, frequence );
			addChild( sample );
			
			sample = new Sine( amplitude, frequence );
			addChild( sample );
			
			sample = new Log( amplitude );
			addChild( sample );
			
			sample = new Exp( amplitude );
			addChild( sample );
			
			sample = new Tan( 20, 60 );
			addChild( sample );
			
			//addChild( new Modulo() );
			
			//addChild( new Random() ) ;
			
		}
	}
	
}